package entity;


import java.io.Serializable;
/**
 * Class representing Complaint entity
 */

public class ComplaintEntity implements Serializable{

	private int ComplaintId;
	private int CustomerId;
	private int workerid;
	private String ComplaintText;
	private String ComplaintAnser;
	private Double Refund;
	private String TimeOpen;
	private String TimeClose;
	
	public ComplaintEntity(){
		
	}
	/**
	 * Constructor for Complaint Entity
	 * @param complaintId
	 * @param customerId
	 * @param workerid
	 * @param complaintText
	 * @param complaintAnser
	 * @param refund
	 */
	public ComplaintEntity(int complaintId, int customerId, int workerid,String complaintText, String complaintAnser, Double refund) {
		super();
		ComplaintId = complaintId;
		CustomerId = customerId;
		this.workerid = workerid;
		ComplaintText = complaintText;
		ComplaintAnser = complaintAnser;
		Refund = refund;		
	}

	//  =====================================getters and setters ========================================================//
	
	public int getComplaintId() {
		return ComplaintId;
	}
	public void setComplaintId(int complaintId) {
		ComplaintId = complaintId;
	}
	public int getCustomerId() {
		return CustomerId;
	}
	public void setCustomerId(int customerId) {
		CustomerId = customerId;
	}
	public int getWorkerid() {
		return workerid;
	}
	public void setWorkerid(int workerid) {
		this.workerid = workerid;
	}
	public String getComplaintText() {
		return ComplaintText;
	}
	public void setComplaintText(String complaintText) {
		ComplaintText = complaintText;
	}
	public String getComplaintAnser() {
		return ComplaintAnser;
	}
	public void setComplaintAnser(String complaintAnser) {
		ComplaintAnser = complaintAnser;
	}
	public Double getRefund() {
		return Refund;
	}
	public void setRefund(Double refund) {
		Refund = refund;
	}
	@Override
	public String toString() {
		return  ComplaintId + "";
	}
	public String getTimeOpen() {
		return TimeOpen;
	}
	public void setTimeOpen(String timeOpen) {
		TimeOpen = timeOpen;
	}
	public String getTimeClose() {
		return TimeClose;
	}
	public void setTimeClose(String timeClose) {
		TimeClose = timeClose;
	}
	/**
	 * getting Filed Name by case
	 * @param i
	 * @return
	 */
	public String getFiledName(int i) {		
		switch (i) {
		case 0: return "Complaint Id";			
		case 1:	return "Customer Id";
		case 2:	return "Worker Id";
		case 3:	return "Complaint Text";
		case 4:	return "Complaint Anser";
		case 5:	return "Refund";
		case 6:	return "Time Open";
		case 7:	return "Time Close";
		
		}
		return null;
	}
	
}
